Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Append SKU to name for SearchListControl #4366

Merged
merged 3 commits into from
Jun 17, 2021

Conversation

mikejolley
Copy link
Member

We had some requests to allow SKUs to be searched in some of our product blocks. SearchListControl only allows searching by the given names, so to support this we can render the SKU appended to the name. This also makes it clearer what product is what when they are similarly named.

Fixes #1098

Screenshots

Screenshot 2021-06-16 at 18 20 52

How to test the changes in this Pull Request:

  1. Insert the hand picked product block
  2. See SKUs shown for products with a SKU
  3. Try searching for a SKU. See results.

Changelog

Allow products to be added by SKU in the Hand-Picked Products block

@mikejolley mikejolley self-assigned this Jun 16, 2021
@mikejolley mikejolley requested a review from a team as a code owner June 16, 2021 17:22
@mikejolley mikejolley requested review from opr and removed request for a team June 16, 2021 17:22
@github-actions
Copy link
Contributor

github-actions bot commented Jun 16, 2021

Size Change: +2 kB (0%)

Total Size: 993 kB

Filename Size Change
build/active-filters-frontend.js 8.04 kB +65 B (+1%)
build/active-filters.js 7.52 kB +1 B (0%)
build/all-products-frontend.js 34.9 kB +149 B (0%)
build/all-products.js 36.6 kB +53 B (0%)
build/all-reviews.js 9.34 kB +56 B (+1%)
build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js 2.51 kB +99 B (+4%)
build/atomic-block-components/add-to-cart--atomic-block-components/button.js 2 kB -1 B (0%)
build/atomic-block-components/add-to-cart-frontend.js 8.67 kB -78 B (-1%)
build/atomic-block-components/add-to-cart.js 7.74 kB -60 B (-1%)
build/atomic-block-components/category-list.js 478 B +1 B (0%)
build/atomic-block-components/price.js 2 kB -4 B (0%)
build/atomic-block-components/rating-frontend.js 520 B -1 B (0%)
build/atomic-block-components/rating.js 524 B +1 B (0%)
build/atomic-block-components/sale-badge-frontend.js 470 B +1 B (0%)
build/atomic-block-components/sale-badge.js 474 B +1 B (0%)
build/atomic-block-components/sku-frontend.js 390 B +1 B (0%)
build/atomic-block-components/sku.js 394 B +1 B (0%)
build/atomic-block-components/stock-indicator-frontend.js 568 B -2 B (0%)
build/atomic-block-components/stock-indicator.js 573 B +1 B (0%)
build/atomic-block-components/summary.js 911 B +2 B (0%)
build/atomic-block-components/tag-list-frontend.js 467 B +1 B (0%)
build/atomic-block-components/tag-list.js 472 B +1 B (0%)
build/atomic-block-components/title-frontend.js 1.41 kB +1 B (0%)
build/atomic-block-components/title.js 1.26 kB +1 B (0%)
build/attribute-filter-frontend.js 17.8 kB +60 B (0%)
build/attribute-filter.js 11.4 kB -1 B (0%)
build/blocks-checkout-editor.js 10.6 kB +12 B (0%)
build/blocks-checkout.js 19.9 kB +14 B (0%)
build/cart-frontend.js 78.5 kB +118 B (0%)
build/cart.js 45.2 kB +79 B (0%)
build/checkout-frontend.js 82.5 kB +108 B (0%)
build/checkout.js 47.3 kB +90 B (0%)
build/featured-category.js 7.3 kB +65 B (+1%)
build/featured-product.js 9.48 kB +75 B (+1%)
build/handpicked-products.js 6.03 kB +144 B (+2%)
build/price-filter-frontend.js 14.2 kB +5 B (0%)
build/price-filter.js 9.37 kB +68 B (+1%)
build/product-best-sellers.js 6.19 kB +68 B (+1%)
build/product-categories.js 3.39 kB +1 B (0%)
build/product-category.js 7.06 kB +67 B (+1%)
build/product-new.js 6.35 kB +68 B (+1%)
build/product-on-sale.js 6.69 kB +70 B (+1%)
build/product-tag.js 6.18 kB +71 B (+1%)
build/product-top-rated.js 6.32 kB +68 B (+1%)
build/products-by-attribute.js 7.29 kB +71 B (+1%)
build/reviews-by-category.js 11.2 kB +59 B (+1%)
build/reviews-by-product.js 12.8 kB +64 B (+1%)
build/reviews-frontend.js 9 kB +59 B (+1%)
build/single-product-frontend.js 38.4 kB +145 B (0%)
build/single-product.js 9.72 kB +68 B (+1%)
build/vendors--atomic-block-components/price-frontend.js 6.53 kB -3 B (0%)
build/wc-blocks-vendors.js 242 kB -3 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js 335 B 0 B
build/atomic-block-components/button-frontend.js 1.73 kB 0 B
build/atomic-block-components/button.js 843 B 0 B
build/atomic-block-components/category-list-frontend.js 470 B 0 B
build/atomic-block-components/image-frontend.js 1.65 kB 0 B
build/atomic-block-components/image.js 1.31 kB 0 B
build/atomic-block-components/price-frontend.js 1.98 kB 0 B
build/atomic-block-components/summary-frontend.js 906 B 0 B
build/price-format.js 1.38 kB 0 B
build/product-search.js 2.68 kB 0 B
build/wc-blocks-data.js 10.9 kB 0 B
build/wc-blocks-editor-style-rtl.css 14.9 kB 0 B
build/wc-blocks-editor-style.css 14.9 kB 0 B
build/wc-blocks-google-analytics.js 1.99 kB 0 B
build/wc-blocks-middleware.js 1.48 kB 0 B
build/wc-blocks-registry.js 2.75 kB 0 B
build/wc-blocks-shared-context.js 1.54 kB 0 B
build/wc-blocks-shared-hocs.js 1.74 kB 0 B
build/wc-blocks-style-rtl.css 19.1 kB 0 B
build/wc-blocks-style.css 19 kB 0 B
build/wc-blocks-vendors-style-rtl.css 1.05 kB 0 B
build/wc-blocks-vendors-style.css 1.05 kB 0 B
build/wc-blocks.js 3.51 kB 0 B
build/wc-payment-method-bacs.js 812 B 0 B
build/wc-payment-method-cheque.js 807 B 0 B
build/wc-payment-method-cod.js 903 B 0 B
build/wc-payment-method-paypal.js 844 B 0 B
build/wc-payment-method-stripe.js 12.4 kB 0 B
build/wc-settings.js 2.94 kB 0 B

compressed-size-action

Copy link
Contributor

@opr opr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well! I am pre-approving on the basis that my comment is non-blocking and up to you if you want to fix it ✅

assets/js/editor-components/products-control/index.js Outdated Show resolved Hide resolved
@mikejolley mikejolley merged commit a8bc7f4 into trunk Jun 17, 2021
@mikejolley mikejolley deleted the update/show-skus-in-search-list-control branch June 17, 2021 10:30
@mikejolley mikejolley added this to the 5.4.0 milestone Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handpicked product block: search by sku
2 participants